import axios from '@/utils/request'
// import store from '@/store'
/**
 *用户登录
 * @param {Number} mobile 手机号
 * @param {NUmber} code 验证码
 * @returns
 */
export const userLogin = (mobile, code) => {
  return axios({
    method: 'POST',
    url: '/v1_0/authorizations',
    data: {
      mobile,
      code
    }
  })
}

/**
 *获取用户信息
 *
 */

export const getUserInfo = () => {
  // console.log(store)
  // const token = store.state.user.token.token
  // console.log(token)
  return axios({
    url: '/v1_0/user/profile',
    method: 'GET'
    // 请求头
    // headers: {
    //   Authorization: 'Bearer ' + token
    // }
  })
}
